package com.sevenre.trackre.driver.datatypes;

import java.util.Date;

public class Stop {

	String name;
	String time, no;
	double lat, lng;

	public String getname() {
		return name;
	}

	public void setname(String name) {
		this.name = name;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public double getLat() {
		return lat;
	}

	public void setLat(double lat) {
		this.lat = lat;
	}

	public double getLng() {
		return lng;
	}

	public void setLng(double lng) {
		this.lng = lng;
	}

	public Stop(String route_name, String time, String no, double lat,
			double lng) {
		super();
		this.name = route_name;
		this.time = time;
		this.no = no;
		this.lat = lat;
		this.lng = lng;
	}

	public Stop(String route_name, String time, String no) {
		super();
		this.name = route_name;
		this.time = time;
		this.no = no;
	}
	
	public Stop() {
		super();
	}

	public Date get_time() {
		Date date = new Date();
		date.setTime(System.currentTimeMillis());
		date.setMinutes(Integer.parseInt(time.substring(3,4)));
		date.setHours(Integer.parseInt(time.substring(0,1)));
		if ( time.toLowerCase().contains("pm")){
			date.setHours(date.getHours()+12);
		}
		return date;
	}

}
